Re: Fwd: Solaris build of 7.4 problem with - Mailing list pgsql-bugs
From | Seum-Lim Gan |
---|---|
Subject | Re: Fwd: Solaris build of 7.4 problem with |
Date | |
Msg-id | p05100304bbea64c1f69b@[192.168.10.94] Whole thread Raw |
In response to | Re: Fwd: Solaris build of 7.4 problem with (Peter Eisentraut <peter_e@gmx.net>) |
Responses |
Re: Fwd: Solaris build of 7.4 problem with
|
List | pgsql-bugs |
Hi Peter, You are right. I looked at the man page and it does not have the -pthread option but the -mt option. Perhaps there is a way to automate and detect which one it has ? I find in the man page that there is another option -###, which is like -# but does not actually execute: The following options are interpreted by cc: -# Show each component as it is invoked (verbose mode). -### Show each component as it is invoked, but, unlike the -# option, do not actually execute. Maybe a better way is to do cc -flags and it will return all the flags and then grep for pthread and see if it is a valid option. Here is the output of cc -flags: -# Verbose mode -### Show compiler commands built by driver, no compilation -A<name[(tokens)]> Preprocessor predicate assertion -B<[static|dynamic]> Specify dynamic or static binding -C Prevent preprocessor from removing comments -c Compile only - produce .o files, suppress linking -D<name[=token]> Associate name with token as if by #define -d[y|n] dynamic [-dy] or static [-dn] option to linker -dalign Expands to -xmemalign=8s -E Compile source through preprocessor only, output to stdout -erroff=<t> Suppress warnings specified by tags t(%none, %all, <tag list>) -errtags=<a> Display messages with tags a(no, yes) -errwarn=<t> Treats warnings specified by tags t(%none, %all, <tag list>) as errors -fast Optimize using a selection of options -fd Report old-style function definitions and declarations -flags Show this summary of compiler options -fnonstd Initialize floating-point hardware to non-standard preferences -fns[=<yes|no>] Select non-standard floating point mode -fround=<r> Select the IEEE rounding mode in effect at startup -fsimple[=<n>] Select floating-point optimization preferences <n> -fsingle Use single-precision arithmetic (-Xt and -Xs modes only) -ftrap=<t> Select floating-point trapping mode in effect at startup -G Build a dynamic shared library -g Compile for debugging -H Print path name of each file included during compilation -h <name> Assign <name> to generated dynamic shared library -I<dir> Add <dir> to preprocessor #include file search path -i Passed to linker to ignore any LD_LIBRARY_PATH setting -keeptmp Keep temporary files created during compilation -KPIC Compile position independent code with 32-bit addresses -Kpic Compile position independent code -L<dir> Pass to linker to add <dir> to the library search path -l<name> Link with library lib<name>.a or lib<name>.so -mc Remove duplicate strings from .comment section of output files -misalign Expands to -xmemalign=1i -misalign2 Expands to -xmemalign=2i -mr Remove all strings from .comment section of output files -mr,"string" Remove all strings and append "string" to .comment section -mt Specify options needed when compiling multi-threaded code -native Optimize for the host system (-xtarget=native) -noqueue Disable queuing of compiler license requests -O Use default optimization level (-xO2) -o <outputfile> Set name of output file to <outputfile> -P Compile source through preprocessor only, output to .i file -p Compile for profiling with prof -Q[y|n] Emit/don't emit identification info to output file -qp Compile for profiling with prof -R<dir[:dir]> Build runtime search path list into executable -S Compile and only generate assembly code (.s) -s Strip symbol table from the executable file -U<name> Delete initial definition of preprocessor symbol <name> -V Report version number of each compilation phase -v Do stricter semantic checking -W<c>,<arg> Pass <arg> to specified component <c> (a,c,l,m,p,0,2,o) -w Suppress compiler warning messages -Xa Compile assuming ANSI C conformance, allow K & R extensions (default mode) -Xc Compile assuming strict ANSI C conformance -Xs Compile assuming (pre-ANSI) K & R C style code -Xt Compile assuming K & R conformance, allow ANSI C -xa Collect data for tcov basic block profiling (old format) -xalias_level=<a> Enable optimizations based on the specified alias_level -xarch=<a> Specify target architecture instruction set -xautopar Enable automatic loop parallelization (requires WorkShop license) -xbuiltin[=<b>] When profitable inline, or substitute intrinisic functions for system functions, b={%all,%none} -xc99[=<a>] Enable ISO C99 features, <a>={%all,%none} -xcache=<c> Define cache properties for use by optimizer -xCC Accept C++ style comments -xcg89 Expands to -xarch=v7 -xchip=old -xcache=64/32/1 -xcg92 Expands to -xarch=v8 -xchip=super -xcache=16/32/4:1024/32/1 -xchar_byte_order=<o> Specify multi-char byte order <o> (default, high, low) -xchip=<c> Specify the target processor for use by the optimizer -xcode=<c> Generate different code for forming addresses -xcrossfile[=<n>] Enable optimization and inlining across source files, n={0|1} -xcsi Allow C source code using non-ISO C compliant locales -xdepend Analyze loops for data dependencies -xe Perform only syntax/semantic checking, no code generation -xexplicitpar Parallelize loops explicitly marked with directives (requires WorkShop license) -xF Compile for later mapfile reordering -xhelp=<f> Display on-line help information f(flags, readme) -xildoff Cancel -xildon -xildon Enable use of the incremental linker, ild -xinline=[<a>,...,<a>] Attempt inlining of specified user routines, <a>={%auto,func,no%func} -xipo[=<n>] Enable optimization and inlining across source files, n={0|1|2} -xlibmieee Force IEEE 754 return values for math routines in exceptional cases -xlibmil Inline selected libm math routines for optimization -xlic_lib=sunperf Link in the Sun supplied performance libraries -xlicinfo Show license server information -xloopinfo Show loops that parallelized (requires WorkShop license) -xM Generate makefile dependencies -xM1 Generate makefile dependencies, but exclude /usr/include -xmaxopt=[off,1,2,3,4,5] maximum optimization level allowed on #pragma opt -xmemalign[=<a><b>] Controls memory alignment, <a>={1|2|4|8|16}, b={i|s}. -xMerge Merge data segment into text segment -xnolib Do not link with default system libraries -xnolibmil Cancel -xlibmil on command line -xO<n> Generate optimized code (n={1|2|3|4|5}) -xopenmp Enable OpenMP language extension -xP Print prototypes for function definitions -xparallel Perform parallel compilation -xpg Compile for profiling with gprof -xprefetch[=<p>] Specify instruction prefetch p (auto,no%auto,explicit,no%explicit,latx:<n>.<n>) -xprofile=<p> Collect data for a profile or use a profile to optimize <p>={{collect,use}[:<path>],tcov} -xreduction Recognize reduction operations in parallelized loops -xregs=<r> Specify the usage of optional registers -xrestrict[=<f>] Treat pointer valued function parameters as restricted f(%none,%all,<function-name list>) -xs Allow debugging without object (.o) files -xsafe=mem Assume that no memory based traps will occur -xsb Compile for use with the WorkShop source browser -xsbfast Generate only WorkShop source browser information, no compilation -xsfpconst Represent unsuffixed floating point constants as single precision -xspace Do not do optimizations that increase code size -xstrconst Place string literals into read-only data segment -xtarget=<t> Specify target system for optimization -xtemp=<dir> Set directory for temporary files to <dir> -xtime Report the execution time for each compilation phase -xtransition Emit warnings for differences between K&R C and ANSI C -xtrigraphs[=<yes|no>] Enable|disable trigraph translation -xunroll=n Enable unrolling loops n times where possible -xvector<=yes|no> Automatic Generation of calls to vector library functions -xvpara Verbose parallelization warnings (requires WorkShop license) -Y<c>,<dir> Specify <dir> for location of component <c> (a,c,l,m,p,0,2,o) -YA,<dir> Change default directory searched for components -YI,<dir> Change default directory searched for include files -YP,<dir> Change default directory for finding libraries files -YS,<dir> Change default directory for startup object files -Zll Create lock_lint database files (.ll) -Zlp Compile for looptool profiling Thanks. Gan At 7:41 am +0100 2003/11/26, Peter Eisentraut wrote: >Seum-Lim Gan writes: > >> I got the output from the cc verbose (-#). >> Looks like there is a "-hread" towards the end. > >Apparently, your compiler does not understand the -pthread option. I've >read on the net that the Sun compiler options for thread-safety have >changed a few times, but I haven't found a system yet. If you just want >to get going, edit src/template/solaris and replace -pthread by the right >option (-mt in your case?). > >-- >Peter Eisentraut peter_e@gmx.net > > >---------------------------(end of broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- +--------------------------------------------------------+ | Seum-Lim GAN email : slgan@lucent.com | | Lucent Technologies | | 2000 N. Naperville Road, 6B-403F tel : (630)-713-6665 | | Naperville, IL 60566, USA. fax : (630)-713-7272 | | web : http://inuweb.ih.lucent.com/~slgan | +--------------------------------------------------------+
pgsql-bugs by date: